package com.cmxh.mycloudnotes.mapper;

import com.cmxh.mycloudnotes.pojo.UpdPwd;
import com.cmxh.mycloudnotes.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
* @author Administrator
* @description 针对表【user(用户表)】的数据库操作Mapper
* @createDate 2025-03-12 20:14:05
* @Entity com.cmxh.mycloudnotes.pojo.User
*/
public interface UserMapper {
    @Insert("insert into user(username,password) values(#{username},#{password})")
    int saveUser(User user);

    @Select("select * from user where username=#{name}")
    User findUsesByUname(String name);

    int updateZt (UpdPwd user);

    @Update("update user set nickname=#{nickname},email=#{email} where id=#{id}")
    int updatePwd(User user);

    @Update( "update user set user_pic=#{userPic} where id=#{id} " )
    int updatePic(User user);

}